package com.androiddelphi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class Principal extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_principal);
		
		final ImageButton abreConvidarAPP = (ImageButton) findViewById(R.id.btnConvidarAPP);
		final ImageButton abreCriarNovaDiscussao = (ImageButton) findViewById(R.id.btnCriarNovaDiscussao);
		final ImageButton abreVisualizarDiscussao = (ImageButton) findViewById(R.id.btnVisualizarDiscussoes);
//		final ImageButton abreConfigurar = (ImageButton) findViewById(R.id.btcf);
		
		abreConvidarAPP.setOnClickListener(this);
		abreCriarNovaDiscussao.setOnClickListener(this);
		abreVisualizarDiscussao.setOnClickListener(this);
//		abreConfigurar.setOnClickListener(this);

		
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btnCriarNovaDiscussao:
			Intent i = new Intent(this,NovaDiscussao.class);
			startActivity(i);
			break;
			
		case R.id.btnVisualizarDiscussoes:
			Intent i2 = new Intent(this,VisualizarDiscussoes.class);
			startActivity(i2);			
			break;

//		case R.id.btcf:
//			Intent i3 = new Intent(this,ToDo.class);
//			startActivity(i3);			
//			break;

		case R.id.btnConvidarAPP:
			Intent i4 = new Intent(this,Convidar.class);
			startActivity(i4);
			break;

		default:
			break;
		}

		
	}


}
